﻿<%@ Page Title="【积分抽奖】" Language="C#" MasterPageFile="~/APP_Master/MasterPage_integral_shop.master"
    AutoEventWireup="true" CodeFile="integral_draw.aspx.cs" Inherits="integral_draw" %>
    
<%@ Register src="~/APP_Controls/Integral/Integral_topNav.ascx" tagname="Integral_topNav" tagprefix="uc1" %>
<%@ Register src="~/APP_Controls/Integral/Integral_Red.ascx" tagname="Integral_Red" tagprefix="uc2" %>
<%@ Register src="~/APP_Controls/Integral/Integral_Contact.ascx" tagname="Integral_Contact" tagprefix="uc3" %>

<%@ Register src="~/APP_Controls/Integral/Draw_Tab.ascx" tagname="Draw_Tab" tagprefix="uc4" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<!--Content-->
<div class="draw_box">
    <!--Left-->
    <div class="integral_index_left white_bg">
        <uc1:Integral_topNav ID="Integral_topNav1" runat="server" />
        <h2 class="integral_luckydraw_title">抽奖规则</h2>
        <div class="draw_detail_infor">
              <%=BLL.CompanyIntr.GetModel(21).Content %>
        </div>
    </div>
    <!--Left-->
    <!--Right-->
    <div class="draw_right">
        <!--<div class="draw_zhuanpan_bg"></div>-->
        <div class="draw_zhuanpan_gift"></div>
        <div class="draw_zhuanpan">
            <link href="../css/demo.css" rel="stylesheet" type="text/css" /> 
            <script src="http://libs.baidu.com/jquery/1.6.4/jquery.min.js" type="text/javascript"></script>
            <script src="../js/awardRotate.js" type="text/javascript"></script> 
    <script type="text/javascript">
        function Exchange(awards,txt) { 
            $.post("../Ajax/Draw.aspx", { type: awards }, function (data) {
                if (data == "sucess") {
                    alert(txt);
                } else {
                    alert(data);
                }
            }, "text");
        }
        $(function () {
            var rotateTimeOut = function () {
                $('#rotate').rotate({
                    angle: 0,
                    animateTo: 2160,
                    duration: 8000,
                    callback: function () {
                        alert('网络超时，请检查您的网络设置！');
                    }
                });
            };
            var bRotate = false;

            var rotateFn = function (awards, angles, txt) {
                bRotate = !bRotate;
                $('#rotate').stopRotate();
                $('#rotate').rotate({
                    angle: 0,
                    animateTo: angles + 1782, //转动角度   
                    duration: 8000, //转动时间  
                    callback: function () { 
                        Exchange(awards, txt)
                        bRotate = !bRotate;
                    }
                })
            };

            $('.pointer').click(function () {
                if (bRotate) return;
                var item = rnd(0, 9);
                switch (item) {
                    case 0:
                        rotateFn(0, 18, '一等奖');
                        break;
                    case 1:
                        rotateFn(1, 54, '祝你好运');
                        break;
                    case 2:
                        rotateFn(2, 90, '六等奖');
                        break;
                    case 3:
                        rotateFn(3, 126, '不要灰心');
                        break;
                    case 4:
                        rotateFn(4, 152, '五等奖');
                        break;
                    case 5:
                        rotateFn(5, 198, '四等奖');
                        break;
                    case 6:
                        rotateFn(6, 234, '要加油哦');
                        break;
                    case 7:
                        rotateFn(7, 270, '三等奖');
                        break;
                    case 8:
                        rotateFn(8, 306, '二等奖');
                        break;
                    case 9:
                        rotateFn(9, 342, '再来一次');
                        break;
                }
            });
        });
        function rnd(n, m) {
            return Math.floor(Math.random() * (m - n + 1) + n)
        }
    </script>
    <div class="turntable-bg"> 
        <div class="pointer"><img src="../images/choujiang.png" alt="pointer"></div>
        <div class="rotate" ><img id="rotate" src="../images/zhuanpan.png" alt="turntable"></div>
    </div>
        </div>
        <div class="draw_zhuanpan_infor">
            <h2>本期大奖</h2>
            <h3>10积分抽一次，每天3次抽奖机会</h3>
            <p><%--<img src="../images/2015102016.gif" />--%></p>
            <dl>
                <dd>红包</dd>
                <dd><em>100元</em></dd>
            </dl>
            <h4>最新中奖名单</h4>
            <!--LeftFontScroll-->      
            <script type="text/javascript" src="../js/scroll.js"></script>
            <script type="text/javascript">
                $(document).ready(function () {
                    $('.list_lh li:even').addClass('lieven');
                })
                $(function () {
                    $("div.list_lh").myScroll({
                        speed: 40, //数值越大，速度越慢
                        rowHeight: 68 //li的高度
                    });
                });
            </script>
            <div class="box">
	            <div class="bcon">
		            <!-- 代码开始 -->
                    <div class="list_lh">
			            <ul>
                        <%if (winlist != null)
                          {
                              foreach (Model.DrawWin model in winlist)
                              {%>
				            <li><%=model.NickName%><%=model.DrawTitle%></li> 
                            <%}
                          } %>
			            </ul>
                    </div>
		            <!-- 代码结束 -->
	            </div>
            </div>
            <!--LeftFontScroll-->
        </div>
    </div>
    <!--Right-->
</div>
<!--End-->
<div class="integral_index_area">
    <!--Left-->
    <div class="integral_index_left" id="leftbox">        
        <uc2:Integral_Red ID="Integral_Red1" runat="server" />
        <uc3:Integral_Contact ID="Integral_Contact1" runat="server" />
    </div>
    <!--Left-->
    <!--Right-->
    <div class="draw_right" id="rightbox">
        <h2 class="draw_right_title">赚积分中大奖两不误——每消费1元即可赚取1个积分</h2>
        <div class="draw_betting_box">
            
            <uc4:Draw_Tab ID="Draw_Tab1" runat="server" />
            
        </div>
        <h2 class="integral_index_right_title2">购彩中奖攻略</h2>
        <div class="draw_strategy_list">
            <dl>
                <dt><img src="../images/2015102014.jpg" /></dt>
                <dd>设置机选期数，注数和倍数</dd>
                <dd>每期系统将自动随机为您选号</dd>
                <dd>机选便捷多期省事祝您中大奖！</dd>
                <dt><a href="/double_betting.aspx">马上双色球机选>>>></a></dt>
            </dl>
            <dl>
                <dt><img src="../images/2015102015.jpg" /></dt>
                <dd>大家一起出钱合买彩票</dd>
                <dd>较少投入增加中奖几率</dd>
                <dd>1元也可以参与中大奖！</dd>
                <dt><a href="/togetherbuy.aspx">43彩友合买分享622万>>>></a></dt>
            </dl>
            <dl>
                <dt><img src="../images/2015102017.jpg" /></dt>
                <dd>选一注自己的幸运号码</dd>
                <dd>连续多期投注，坚守到底</dd>
                <dd>也许下个大奖得主就是你！</dd>
                <dt><a href="/buy_lottery_hall.aspx">欢迎购彩大厅>>>></a></dt>
            </dl>
        </div>
    </div>
    <!--Right-->
</div>
<!--Content-->
<script type="text/javascript">  
  <!--
    var a = document.getElementById("leftbox");
    var b = document.getElementById("rightbox");
    if (a.clientHeight < b.clientHeight) {
        a.style.height = b.clientHeight + "px";
    }
    else {
        b.style.height = a.clientHeight + "px";
    }    
  -->    
</script>
</div>
<!--Content-->
</asp:Content>
